﻿
namespace WordShit.Web
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data;
    using System.Linq;
    using System.ServiceModel.DomainServices.EntityFramework;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;


    // Implements application logic using the WordEntities context.
    // TODO: Add your application logic to these methods or in additional methods.
    // TODO: Wire up authentication (Windows/ASP.NET Forms) and uncomment the following to disable anonymous access
    // Also consider adding roles to restrict access as appropriate.
    // [RequiresAuthentication]
    [EnableClientAccess()]
    public class DomainServiceWord : LinqToEntitiesDomainService<WordEntities>
    {

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_Applications' query.
        public IQueryable<aspnet_Applications> GetAspnet_Applications()
        {
            return this.ObjectContext.aspnet_Applications;
        }

        public void InsertAspnet_Applications(aspnet_Applications aspnet_Applications)
        {
            if ((aspnet_Applications.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_Applications, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_Applications.AddObject(aspnet_Applications);
            }
        }

        public void UpdateAspnet_Applications(aspnet_Applications currentaspnet_Applications)
        {
            this.ObjectContext.aspnet_Applications.AttachAsModified(currentaspnet_Applications, this.ChangeSet.GetOriginal(currentaspnet_Applications));
        }

        public void DeleteAspnet_Applications(aspnet_Applications aspnet_Applications)
        {
            if ((aspnet_Applications.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_Applications.Attach(aspnet_Applications);
            }
            this.ObjectContext.aspnet_Applications.DeleteObject(aspnet_Applications);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_Membership' query.
        public IQueryable<aspnet_Membership> GetAspnet_Membership()
        {
            return this.ObjectContext.aspnet_Membership;
        }

        public void InsertAspnet_Membership(aspnet_Membership aspnet_Membership)
        {
            if ((aspnet_Membership.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_Membership, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_Membership.AddObject(aspnet_Membership);
            }
        }

        public void UpdateAspnet_Membership(aspnet_Membership currentaspnet_Membership)
        {
            this.ObjectContext.aspnet_Membership.AttachAsModified(currentaspnet_Membership, this.ChangeSet.GetOriginal(currentaspnet_Membership));
        }

        public void DeleteAspnet_Membership(aspnet_Membership aspnet_Membership)
        {
            if ((aspnet_Membership.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_Membership.Attach(aspnet_Membership);
            }
            this.ObjectContext.aspnet_Membership.DeleteObject(aspnet_Membership);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_Paths' query.
        public IQueryable<aspnet_Paths> GetAspnet_Paths()
        {
            return this.ObjectContext.aspnet_Paths;
        }

        public void InsertAspnet_Paths(aspnet_Paths aspnet_Paths)
        {
            if ((aspnet_Paths.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_Paths, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_Paths.AddObject(aspnet_Paths);
            }
        }

        public void UpdateAspnet_Paths(aspnet_Paths currentaspnet_Paths)
        {
            this.ObjectContext.aspnet_Paths.AttachAsModified(currentaspnet_Paths, this.ChangeSet.GetOriginal(currentaspnet_Paths));
        }

        public void DeleteAspnet_Paths(aspnet_Paths aspnet_Paths)
        {
            if ((aspnet_Paths.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_Paths.Attach(aspnet_Paths);
            }
            this.ObjectContext.aspnet_Paths.DeleteObject(aspnet_Paths);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_PersonalizationAllUsers' query.
        public IQueryable<aspnet_PersonalizationAllUsers> GetAspnet_PersonalizationAllUsers()
        {
            return this.ObjectContext.aspnet_PersonalizationAllUsers;
        }

        public void InsertAspnet_PersonalizationAllUsers(aspnet_PersonalizationAllUsers aspnet_PersonalizationAllUsers)
        {
            if ((aspnet_PersonalizationAllUsers.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_PersonalizationAllUsers, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_PersonalizationAllUsers.AddObject(aspnet_PersonalizationAllUsers);
            }
        }

        public void UpdateAspnet_PersonalizationAllUsers(aspnet_PersonalizationAllUsers currentaspnet_PersonalizationAllUsers)
        {
            this.ObjectContext.aspnet_PersonalizationAllUsers.AttachAsModified(currentaspnet_PersonalizationAllUsers, this.ChangeSet.GetOriginal(currentaspnet_PersonalizationAllUsers));
        }

        public void DeleteAspnet_PersonalizationAllUsers(aspnet_PersonalizationAllUsers aspnet_PersonalizationAllUsers)
        {
            if ((aspnet_PersonalizationAllUsers.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_PersonalizationAllUsers.Attach(aspnet_PersonalizationAllUsers);
            }
            this.ObjectContext.aspnet_PersonalizationAllUsers.DeleteObject(aspnet_PersonalizationAllUsers);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_PersonalizationPerUser' query.
        public IQueryable<aspnet_PersonalizationPerUser> GetAspnet_PersonalizationPerUser()
        {
            return this.ObjectContext.aspnet_PersonalizationPerUser;
        }

        public void InsertAspnet_PersonalizationPerUser(aspnet_PersonalizationPerUser aspnet_PersonalizationPerUser)
        {
            if ((aspnet_PersonalizationPerUser.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_PersonalizationPerUser, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_PersonalizationPerUser.AddObject(aspnet_PersonalizationPerUser);
            }
        }

        public void UpdateAspnet_PersonalizationPerUser(aspnet_PersonalizationPerUser currentaspnet_PersonalizationPerUser)
        {
            this.ObjectContext.aspnet_PersonalizationPerUser.AttachAsModified(currentaspnet_PersonalizationPerUser, this.ChangeSet.GetOriginal(currentaspnet_PersonalizationPerUser));
        }

        public void DeleteAspnet_PersonalizationPerUser(aspnet_PersonalizationPerUser aspnet_PersonalizationPerUser)
        {
            if ((aspnet_PersonalizationPerUser.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_PersonalizationPerUser.Attach(aspnet_PersonalizationPerUser);
            }
            this.ObjectContext.aspnet_PersonalizationPerUser.DeleteObject(aspnet_PersonalizationPerUser);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_Profile' query.
        public IQueryable<aspnet_Profile> GetAspnet_Profile()
        {
            return this.ObjectContext.aspnet_Profile;
        }

        public void InsertAspnet_Profile(aspnet_Profile aspnet_Profile)
        {
            if ((aspnet_Profile.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_Profile, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_Profile.AddObject(aspnet_Profile);
            }
        }

        public void UpdateAspnet_Profile(aspnet_Profile currentaspnet_Profile)
        {
            this.ObjectContext.aspnet_Profile.AttachAsModified(currentaspnet_Profile, this.ChangeSet.GetOriginal(currentaspnet_Profile));
        }

        public void DeleteAspnet_Profile(aspnet_Profile aspnet_Profile)
        {
            if ((aspnet_Profile.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_Profile.Attach(aspnet_Profile);
            }
            this.ObjectContext.aspnet_Profile.DeleteObject(aspnet_Profile);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_Roles' query.
        public IQueryable<aspnet_Roles> GetAspnet_Roles()
        {
            return this.ObjectContext.aspnet_Roles;
        }

        public void InsertAspnet_Roles(aspnet_Roles aspnet_Roles)
        {
            if ((aspnet_Roles.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_Roles, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_Roles.AddObject(aspnet_Roles);
            }
        }

        public void UpdateAspnet_Roles(aspnet_Roles currentaspnet_Roles)
        {
            this.ObjectContext.aspnet_Roles.AttachAsModified(currentaspnet_Roles, this.ChangeSet.GetOriginal(currentaspnet_Roles));
        }

        public void DeleteAspnet_Roles(aspnet_Roles aspnet_Roles)
        {
            if ((aspnet_Roles.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_Roles.Attach(aspnet_Roles);
            }
            this.ObjectContext.aspnet_Roles.DeleteObject(aspnet_Roles);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_SchemaVersions' query.
        public IQueryable<aspnet_SchemaVersions> GetAspnet_SchemaVersions()
        {
            return this.ObjectContext.aspnet_SchemaVersions;
        }

        public void InsertAspnet_SchemaVersions(aspnet_SchemaVersions aspnet_SchemaVersions)
        {
            if ((aspnet_SchemaVersions.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_SchemaVersions, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_SchemaVersions.AddObject(aspnet_SchemaVersions);
            }
        }

        public void UpdateAspnet_SchemaVersions(aspnet_SchemaVersions currentaspnet_SchemaVersions)
        {
            this.ObjectContext.aspnet_SchemaVersions.AttachAsModified(currentaspnet_SchemaVersions, this.ChangeSet.GetOriginal(currentaspnet_SchemaVersions));
        }

        public void DeleteAspnet_SchemaVersions(aspnet_SchemaVersions aspnet_SchemaVersions)
        {
            if ((aspnet_SchemaVersions.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_SchemaVersions.Attach(aspnet_SchemaVersions);
            }
            this.ObjectContext.aspnet_SchemaVersions.DeleteObject(aspnet_SchemaVersions);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_Users' query.
        public IQueryable<aspnet_Users> GetAspnet_Users()
        {
            return this.ObjectContext.aspnet_Users;
        }

        public void InsertAspnet_Users(aspnet_Users aspnet_Users)
        {
            if ((aspnet_Users.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_Users, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_Users.AddObject(aspnet_Users);
            }
        }

        public void UpdateAspnet_Users(aspnet_Users currentaspnet_Users)
        {
            this.ObjectContext.aspnet_Users.AttachAsModified(currentaspnet_Users, this.ChangeSet.GetOriginal(currentaspnet_Users));
        }

        public void DeleteAspnet_Users(aspnet_Users aspnet_Users)
        {
            if ((aspnet_Users.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_Users.Attach(aspnet_Users);
            }
            this.ObjectContext.aspnet_Users.DeleteObject(aspnet_Users);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_WebEvent_Events' query.
        public IQueryable<aspnet_WebEvent_Events> GetAspnet_WebEvent_Events()
        {
            return this.ObjectContext.aspnet_WebEvent_Events;
        }

        public void InsertAspnet_WebEvent_Events(aspnet_WebEvent_Events aspnet_WebEvent_Events)
        {
            if ((aspnet_WebEvent_Events.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_WebEvent_Events, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_WebEvent_Events.AddObject(aspnet_WebEvent_Events);
            }
        }

        public void UpdateAspnet_WebEvent_Events(aspnet_WebEvent_Events currentaspnet_WebEvent_Events)
        {
            this.ObjectContext.aspnet_WebEvent_Events.AttachAsModified(currentaspnet_WebEvent_Events, this.ChangeSet.GetOriginal(currentaspnet_WebEvent_Events));
        }

        public void DeleteAspnet_WebEvent_Events(aspnet_WebEvent_Events aspnet_WebEvent_Events)
        {
            if ((aspnet_WebEvent_Events.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_WebEvent_Events.Attach(aspnet_WebEvent_Events);
            }
            this.ObjectContext.aspnet_WebEvent_Events.DeleteObject(aspnet_WebEvent_Events);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'Files' query.
        public IQueryable<File> GetFiles()
        {
            return this.ObjectContext.Files;
        }

        public void InsertFile(File file)
        {
            if ((file.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(file, EntityState.Added);
            }
            else
            {
                this.ObjectContext.Files.AddObject(file);
            }
        }

        public void UpdateFile(File currentFile)
        {
            this.ObjectContext.Files.AttachAsModified(currentFile, this.ChangeSet.GetOriginal(currentFile));
        }

        public void DeleteFile(File file)
        {
            if ((file.EntityState == EntityState.Detached))
            {
                this.ObjectContext.Files.Attach(file);
            }
            this.ObjectContext.Files.DeleteObject(file);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'Folders' query.
        public IQueryable<Folder> GetFolders()
        {
            return this.ObjectContext.Folders;
        }

        public void InsertFolder(Folder folder)
        {
            if ((folder.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(folder, EntityState.Added);
            }
            else
            {
                this.ObjectContext.Folders.AddObject(folder);
            }
        }

        public void UpdateFolder(Folder currentFolder)
        {
            this.ObjectContext.Folders.AttachAsModified(currentFolder, this.ChangeSet.GetOriginal(currentFolder));
        }

        public void DeleteFolder(Folder folder)
        {
            if ((folder.EntityState == EntityState.Detached))
            {
                this.ObjectContext.Folders.Attach(folder);
            }
            this.ObjectContext.Folders.DeleteObject(folder);
        }
    }
}


